package com.aop.springbootaop.mapper;

import com.aop.springbootaop.entity.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface UserMapper extends BaseMapper<User> {
    // 自定义的 select 方法
    @Select("select * from user where id = #{id}")
    User selectUserById(Long id);

    @Select("select * from user limit #{pageNum},#{pageSize}")
    List<User> selectUserByPage(int pageNum, int pageSize);
}
